package com.xjtu.chapter08.thread.producer_consumer;

/**
 * @author yjq
 * @version 1.0
 * @date 2021/8/30 11:38
 */
public class Consumer implements Runnable {
    Storage storage;

    public Consumer(Storage storage) {
        this.storage = storage;
    }

    @Override
    public void run() {
        for (int i = 0; i <storage.products.length ; i++) {
            storage.pop();
        }
    }
}
